package cn.lijida.weiwei.favor.modules.sys.bo;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;

import lombok.Data;

@Data
public class LoginBO {

	@NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^[\u4E00-\u9FA5A-Za-z0-9_]+$", message = "用户名只能包含字符、数字和下划线")
	private String userName;
	
	@NotBlank(message = "密码不能为空")
    @Length(min = 6, max = 18, message = "密码长度超过限制")
    @Pattern(regexp = "((?=.*\\d)(?=.*\\D)|(?=.*[a-zA-Z])(?=.*[^a-zA-Z]))(?!^.*[\\u4E00-\\u9FA5].*$)^\\S{6,20}$", message = "密码强度过低，数字字母特殊符号至少包含两种")
	private String password;
	
	private String deviceId;
}
